<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02-常用指令 v-moel 双向数据绑定，一般用于表单元素</title>
    <script src="../js/vue.min.js"></script>
</head>
<body>
<div id="app">
    用户名: <input type="text" v-model="name" style="color: red"> <br>
    username:{{name}} <br>
    age: {{age}} <br>
    flag: {{flag}} <br>
    nums: {{nums}} <br>
    user_obj: {{user}} <br>

</div>
<script>
    let vm = new Vue({
        el: "#app",
        data() {
            return {
                name: '',
                age: 21,
                flag: true,
                nums: [1, 324, 567, 901],
                user: {id: 898, name: 'suse'}
            }
        }
    })
</script>
</body>
</html>